Settings_SegHdmLeadfield.m 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % ADVANCED SETTINGS SEGMENTATION, HEADMODELS, LEADFIELDS: %
  3. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4. %
  5. % This settings file will be read by the BuilderGUI.
  6. % - Settings here will be loaded into the Builder .mat and applied to analysis.
  7. %
  8. % Usage:
  9. % a) Settings under "DO NOT EDIT" are handled by [MEG]PLS. Do not alter these.
  10. % b) Change other values as needed. See "help" command for FieldTrip section.
  11. % c) Optional settings can be uncommented and specified.
  12. %
  13. function [cfgSegMRI, cfgHdm, cfgLead] = Settings_SegHdmLeadfield(InputFTcfg)
  14. % DO NOT EDIT:
  15. cfgHdm = InputFTcfg.Hdm;
  16. cfgLead = InputFTcfg.Lead;
  17. %--- "FT_VOLUMESEGMENT" SETTINGS FOR MRI SEGMENT: ---%
  18. %----------------------------------------------------%
  19. % DO NOT EDIT:
  20. cfgSegMRI.spmversion = 'spm8';
  21. SpmPath = spm('dir');
  22. % GENERAL SETTINGS:
  23. cfgSegMRI.output = 'brain'; % 'tpm', 'brain', 'skull', 'gray', 'white', 'skullstrip', 'scalp'
  24. cfgSegMRI.template = [SpmPath,'/templates/T1.nii']; % Filename of template anatomical MRI.
  25. % SMOOTH & THRESHOLD SETTINGS:
  26. cfgSegMRI.downsample = 1; % Integer # to downsample (Default = 1; no downsampling).
  27. cfgSegMRI.brainsmooth = 5;
  28. cfgSegMRI.scalpsmooth = 5;
  29. cfgSegMRI.brainthreshold = 0.5; % Can lower thresholds if MRI noisy.
  30. cfgSegMRI.scalpthreshold = 0.5;
  31. % OPTIONAL SETTINGS:
  32. % cfgSegMRI.write = 'no'; % Write to SPM8-NIFTI file for mask.
  33. % cfgSegMRI.name = '' % String for filename if write = 'yes'.
  34. % cfgSegMRI.tpm = {} % Cell-array of filenames for tissue-probability maps.
  35. %--- "FT_PREPARE_HEADMODEL" SETTINGS: ---%
  36. %----------------------------------------%
  37. % DO NOT EDIT:
  38. cfgHdm.method = InputFTcfg.Hdm.method;
  39. cfgHdm.grad = [];
  40. % GENERAL SETTINGS:
  41. cfgHdm.tissue = cfgSegMRI.output; % SegMRI output used for headmodel.
  42. % LOCALSPHERE SETTINGS:
  43. cfgHdm.radius = 9;
  44. cfgHdm.maxradius = 25;
  45. cfgHdm.feedback = 'no';
  46. % OPTIONAL LOCALSPHERE SETTINGS:
  47. % cfgHdm.baseline
  48. % OTHER OPTIONAL SETTINGS:
  49. % cfgHdm.conductivity
  50. % cfgHdm.hdmfile
  51. %--- "FT_PREPARE_LEADFIELD" SETTINGS: ---%
  52. %----------------------------------------%
  53. % DO NOT EDIT:
  54. cfgLead.grid.resolution = InputFTcfg.Lead.grid.resolution;
  55. cfgLead.reducerank = 2; % Required for MEG.
  56. cfgLead.vol = [];
  57. cfgLead.channel = 'MEG';
  58. cfgLead.grid.unit = 'mm';
  59. % GENERAL SETTINGS:
  60. cfgLead.grid.xgrid = 'auto';
  61. cfgLead.grid.ygrid = 'auto';
  62. cfgLead.grid.zgrid = 'auto';
  63. cfgLead.normalize = 'no';
  64. cfgLead.normalizeparam = 0.5;
  65. % OPTIONAL ROI SETTINGS (Replaces xgrid, ygrid, and zgrid):
  66. % cfgLead.grid.pos
  67. % cfgLead.grid.dim
  68. % cfgLead.grid.inside
  69. % cfgLead.grid.outside
  70. % OTHER OPTIONAL SETTINGS:
  71. % cfgLead.grad % Note: Normally present in the data.
  72. % cfgLead.gradfile % Note: Normally present in the data.